package java33;

import java.util.Scanner;

public class Person {
	private String name;
	private boolean gender;
	private int age;
	private int id;
	private static int nums;
	public Person(){
		System.out.println("This is constructor");
		System.out.println(name+","+age+","+gender+","+id);
	}
	public Person(String name,int age,boolean gender){
		this.name=name;
		this.gender=gender;
		this.age=age;
	}
    {
    	id=nums++;
    	System.out.println("This is initialization block, id is "+id);
	}
	static{
		System.out.println("This is static initialization block");
	}
	@Override
	public String toString() {
		return "Person [name=" + name + ", age=" + age + ", gender=" + gender + ", id=" + id + "]";
	}

	

}

